﻿/**
//  CloseSessionCommand.cs
//  Marquee Moment
//  Copyright 2011 Systematix Technocrates. All rights reserved.
**/
using EDSDKLib;
using MarqueeMoment.CameraController.Camera;

namespace MarqueeMoment.CameraController.Command
{
    public class CloseSessionCommand : Command
    {

        public CloseSessionCommand(CameraModel inModel)
            : base(inModel)
        {
        }


        //// Execute a command.
        public override bool execute()
        {
            uint err = EDSDK.EDS_ERR_OK;

            //// Open session with remote camera.
            err = EDSDK.EdsCloseSession(base.model.getCameraObject());


            //// Notify Error.
            if (err != EDSDK.EDS_ERR_OK)
            {
                base.model.notifyObservers(commandName.errr, err);
            }
            return true;

        }


    }
}
